---
image: /generated/articles-docs-webcodecs-get-default-video-codec.png
id: get-default-video-codec
title: getDefaultVideoCodec()
slug: /webcodecs/get-default-video-codec
crumb: '@remotion/webcodecs'
---

:::warning
[We are phasing out Remotion WebCodecs and are moving to Mediabunny](/blog/mediabunny)!
:::

_Part of the [`@remotion/webcodecs`](/docs/webcodecs) package._

:::warning
**Unstable API**: This package is experimental. We might change the API at any time, until we remove this notice.
:::

Gets the default video codec for a container that `@remotion/webcodecs` uses if no other audio codec was specified.

```tsx twoslash title="Get the default video codec for a container"
import {getDefaultVideoCodec} from '@remotion/webcodecs';

getDefaultVideoCodec({container: 'webm'}); // 'vp8'
```

import {DefaultVideoCodecs} from './DefaultVideoCodecs';

## Default video codecs

<DefaultVideoCodecs />

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/webcodecs/src/get-default-video-codec.ts)
- [`getDefaultAudioCodec()`](/docs/webcodecs/get-default-audio-codec)
